package jou.cs.controller;

import jou.cs.service.UserService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

@ResponseBody
@RequestMapping("login")
public class login {
    @Resource
    private UserService userService;
    // 拦截post请求根据用户账号密码登录
    @PostMapping("/login")
    public String login(String username, String password) {
        userService.login(username, password);
        return "";
    }
}
